package com.zxy.demo.guava.fastjson;

import com.ximalaya.serialization.json.FastjsonJsonParser;

/**
 * 测试fastjson
 * 
 * Created by zxybird on 16/12/13.
 */
public class FastJsonTest {

  static FastjsonJsonParser parser = new FastjsonJsonParser(false);

  public static void main(String[] args) {
    System.out.println(parser.toString(null));

//    ApplyInput applyInput = new ApplyInput();
//
//    applyInput.setUid(1L);
//    System.out.println(parser.toString(applyInput));

    Person son = new Person("Son", 1, null);
    Person father = new Person("Father", 21, son);

    System.out.println(parser.toString(father));

  }

}

class Person {
  public String name;

  public int age;

  public Person son;

  public Person(String name, int age, Person son) {
    this.name = name;
    this.age = age;
    this.son = son;
  }
}
